/****************************************************************************
 *   <SPG2 - Secure Password Generator>
 *   Copyright (C) 2010  <Robert Carr>
 *
 *   This program is free software: you can redistribute it and/or modify
 *   it under the terms of the GNU General Public License as published by
 *   the Free Software Foundation, either version 3 of the License, or
 *   (at your option) any later version.
 *
 *   This program is distributed in the hope that it will be useful,
 *   but WITHOUT ANY WARRANTY; without even the implied warranty of
 *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 *   GNU General Public License for more details.
 *
 *   You should have received a copy of the GNU General Public License
 *   along with this program.  If not, see <http://www.gnu.org/licenses/>.
 *   
 *   @author Robert Carr (etftw)
 *   @version 2.5.4
 *   
 ***************************************************************************/

package spg2;

import javax.swing.JOptionPane;

public class SPG2 
{	
	private static void startSetup()
	{
		try {
			SetupWizard test = new SetupWizard(null, "SPG2: Initial Setup");
		} catch (Exception e) {
			JOptionPane.showMessageDialog(null, "Error: a setup wizard is already running!");
		}
	}
	
	public static void main(String[] args) 
	{
		try
		{
			if(SPG2.class.getResource("bank/db.joo").getFile().length() == 0)
			{
				startSetup();
			}
		}
		catch(NullPointerException e)
		{
			startSetup();
		}
		
		try 
		{
			@SuppressWarnings("unused")
			MainMenu menu = new MainMenu("SPG2");
		} catch (Exception e1) {
			JOptionPane.showMessageDialog(null, "SPG2 already running!");
		}
	}
}